home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-M68K / MAC_PSC.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  1KB  |  74 lines

  1. /*
  2.  *    Apple Peripheral System Controller (PSC)
  3.  *
  4.  *    The PSC is used on the AV Macs to control IO functions not handled
  5.  *    by the VIAs (Ethernet, DSP, SCC).
  6.  */
  7.  
  8. #define PSCBASE        0x50F31000
  9.  
  10. /*
  11.  *    The IER/IFR registers work like the VIA, except that it has 4
  12.  *    of them each on different interrupt levels.
  13.  */
  14.  
  15. #define pIFR3        0x130
  16. #define pIFR4        0x140
  17. #define pIFR5        0x150
  18. #define pIFR6        0x160
  19.  
  20. #define pIER3        0x134
  21. #define pIER4        0x144
  22. #define pIER5        0x154
  23. #define pIER6        0x164
  24.  
  25. /*
  26.  *    Ethernet Control Registers
  27.  */
  28.  
  29. #define PSC_ENETRD_CTL  0xc10
  30. #define PSC_ENETWR_CTL  0xc20
  31.  
  32. /*
  33.  *    Receive DMA channel (add +0x10 for 2nd channel)
  34.  */
  35.  
  36. #define PSC_ENETRD_ADDR 0x1020 
  37. #define PSC_ENETRD_LEN  0x1024
  38. #define PSC_ENETRD_CMD  0x1028
  39.  
  40. /*
  41.  *    Transmit DMA channel (add +0x10 for 2nd channel)
  42.  */
  43.  
  44. #define PSC_ENETWR_ADDR 0x1040
  45. #define PSC_ENETWR_LEN  0x1044
  46. #define PSC_ENETWR_CMD  0x1048
  47.  
  48. /*
  49.  *    Access functions
  50.  */
  51.  
  52. extern volatile unsigned char *psc;
  53.  
  54. extern inline void psc_write_word(int offset, u16 data)
  55. {
  56.     *((volatile u16 *)(psc+offset)) = data;
  57. }
  58.  
  59. extern inline void psc_write_long(int offset, u32 data)
  60. {
  61.     *((volatile u32 *)(psc+offset)) = data;
  62. }
  63.  
  64. extern inline u16 psc_read_word(int offset)
  65. {
  66.     return *((volatile u16 *)(psc+offset));
  67. }
  68.  
  69. extern inline u32 psc_read_long(int offset)
  70. {
  71.     return *((volatile u32 *)(psc+offset));
  72. }
  73.  
  74.